AUTOCALC.EXE ------------ This program is a little utility to remove the tedium from working out the space requirements of your application when preparing your WINSTALL.INF file. It automates the process of calculating the space requirements and writes the results to a file which you can then import into your INF file. Specifically, the program does the following; [a] read the $DISK lines in your WINSTALL.INF file [b] read the $WINDIR lines in your WINSTALL.INF file [c] read the $SYSDIR lines in your WINSTALL.INF file [d] read the $TEMPDIR lines in your WINSTALL.INF file [e] read the $OPTIONAL lines in your WINSTALL.INF file [f] check for all the files on those lines [g] obtain the sizes of the files (if a file is compressed, it gets the size of the expanded image of the file) [h] total the sizes of all the files in the installation set [i] total the sizes of the files that make up each user option [j] total the sizes of the files that go into the Windows directory [k] total the sizes of the files that go into the Windows SYSTEM directory [l] total the sizes of the files that go into the TEMP directory (for $SWAP-SPACE) [m] add 0.5% to each of the figures, as a safety margin (because of disk cluster sizes) [n] display the results on the screen [o] write the result into a file (OPTIONS.LOG), and/or the Windows clipboard in the format required for the INF file (you can then paste from the clipboard, or import the contents of the file into your INF file) to replace the $SPACE $WINDIR-SPACE $SYSDIR-SPACE $SWAP-SPACE $USER-OPTION lines It would be a lot easier if these lines were grouped togther, near the beginning of your INF file. Please try to ensure that the directory in which the files are only contains files that will go on your installation disks - otherwise, the calculations might be wrong. Also, try to be a little specific in your use of wildcards on $DISK lines (especially if your installation set consists of more than 1 disk) - e.g., do NOT do something like; $DISK1=*.* $DISK2=*.* $DISK3=*.??_ $DISK4=*.??_ This will only confuse the program, and the same files will be processed over and over again. One common cause of inaccurate space calculations by AUTOCALC is the indiscriminate use of wildcard characters. Please NOTE this point. The program is a simple Windows program. If run without any argument, it looks for WINSTALL.INF, and the installation files, in the current directory and writes its output to OPTIONS.LOG in the current directory. Note that only one directory is checked for the installation files. Thus it is advisable to have all your installation files in a single directory on a hard drive, and run this program there before copying the files onto floppies. It can also take 2 arguments. If arguments are used, they must be in the following format; arg 1 = the directory in which your installation files are located (your WINSTALL.INF file must also be in that directory) arg 2 = the name of the output file If you are going to use the *second* argument, you MUST use both of them (because the directory must always be the first argument). e.g., if you have prepared all the file for your installation disks and they are currently in a directory called C:\FINAL, waiting for copying to the installation disks, you can run the following command, to finalise you WINSTALL.INF file's details; AUTOCALC c:\final c:\temp\myopt.txt or AUTOCALC c:\final NOTES: ------ 1. AutoCalc sometimes gives you a negative value for $SPACE (or any of the others). In such cases, simply replace the negative value with a ZER0. 2. Sometimes the space calculations produced by AutoCalc are not accurate. There are many causes for wrong calculations by AUTOCALC. The primary cause is indiscriminate use of wildcards in your INF file. Other causes, which might be related to the one already mentioned are: [a] Mixing wildcards and full file names on $DISK, $SYSDIR, $WINDIR, $TEMPDIR, and $OPTIONAL lines - this might result in some files being processed more than once. [b] Having files in the directories being processed by AUTOCALC which files are not going to be on your distribution disks. The bottom line is this - if you are going to use wildcards on your $DISK and/or $OPTIONAL lines, you need to think very carefully about what you are doing. It is up to you to arrange your lines so that no file is liable to be processed twice - this is because AUTOCALC processes your INF file _exactly_ as it finds it. In my view, it advisable to AVOID mixing wildcards and full file names on $OPTIONAL lines. Either use ONLY wildcards, or ONLY full file names. But if you are NOT relying on AutoCalc for your space calculations, then you can freely mix wildcards and full file names. ----------------------------------------------------------------------- "ADVANCED" FEATURES -------------------- These features are meant for those who are not worried about getting their hands dirty. If seemingly complicated INI files and stuff is not your cup of tea, then please STOP reading now! AUTOCALC has been revamped in many ways. You can still run it EXACTLY as described above - but there is added functionality. It will optionally produce a full template for an INF file (in a file called FINAL.INF), in which you can later fill in the details. For these purposes, AUTOCALC can use an INI file (default = AUTOCALC.INI) to get details about your program's files. This file is a sort of "MAKE" file, which AUTOCALC will parse before processing and writing out your full template. Any $USER-OPTION option and $OPTINAL lines should be in a file called OPTIONS.INF. This file will be read to process your USER OPTIONS and the processed information will eventually by written by AUTOCALC into your template INF file (by default, this is called FINAL.INF) To activate this new functionality, you need to supply /FULL as the *first* parameter to AUTOCALC.EXE. The *second* parameter (if /FULL is the first parameter) can be either; [a] a directory path (this is where all your program's files are) - this directory willl be scanned, and ALL the files in it will be used to create $DISK lines. or [b] /f= NOTE that if you do not have an AUTOCALC.INI file in the directory from which AUTOCALC is run, then you must supply a second parameter (after /FULL). If you have the AUTOCALC.INI file, then it will be read for details about your program's files. The format of the INI file is as follows; $SOURCEDIR = the directory where ALL your program's files are (this directory must contain only the files which are going to be on your disktribution disks, and must include files which will go into the $SYSDIR $WINDIR and $TEMPDIR directories as well) If you have more than 1 disk, then you should create a subdirectory under this directory for each of the other disks, and put each disk's files into its own subdirectory. AUTOCALC will automatically scan $SOURCEDIR for subdirectories called; DISK2, DISK3, DISK4, etc., each of them representing files for other disks in your installation set. $OPTIONS = filename which contains your user option declarations $SYSDIR = directory which holds the files which go into $SYSDIR (you can put dummy files with zero bytes here). If this line is empty, AUTOCALC will look for the files in $SOURCEDIR\SYSDIR. $WINDIR = directory which holds the files which go into $WINDIR (you can put dummy files with zero bytes here). If this line is empty, AUTOCALC will look for the files in $SOURCEDIR\WINDIR. $TEMPDIR = directory which holds the files which go into $TEMPDIR (you can put dummy files with zero bytes here). If this line is empty, AUTOCALC will look for the files in $SOURCEDIR\TEMPDIR. $INF-FILE = the name of the template INF file to be produced (default = $SOURCEDIR\FINAL.INF) e.g., $SOURCEDIR=c:\install\new\release $OPTIONS=c:\install\ver16opt.inf $SYSDIR= $WINDIR= $TEMPDIR= $INF-FILE=c:\install\testing.inf AUTOCALC can also take a last parameter /COPY. If used, this *must* be the 3rd parameter passed to AUTOCALC.EXE. When used, AUTOCALC will try to create your installation disks for you by copying the files from your $SOURCEDIR and $SOURCEDIR\DISK# directories to a designated destination. You will be asked to supply the destination directory/drive at the appropriate moment. This feature is probably very buggy. ------------------- Examples of running AUTOCALC with /FULL parameter; AUTOCALC /FULL c:\install2\release AUTOCALC /FULL /f=c:\install2\prog1.mak AUTOCALC /FULL /f=c:\install2\prog1.mak /COPY ---------------------------------